package com.example.demo.study.objectpolymorphic;

public class Pig extends Animal {

    // 重写eat方法
    @Override
    public void eat() {
        System.out.println("吃猪食");
    }
    public void  sleep(){
     System.out.println("猪睡觉");
    }
}
